package combine.order.impl.dao.ibatis;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;

import org.springframework.stereotype.Repository;

import combine.order.model.FinishedProduct;
import combine.utils.DataPage;
import combine.utils.dao.ibatis.IBatisEntityDao;

@Repository
public class FinishProductDaoIbatis extends IBatisEntityDao<FinishedProduct> {

	public List<FinishedProduct> findAllFinishedProduct() throws SQLException {
		return getSqlSession().selectList(
				"combine_order_model_FinishedProduct_findAllFinishedProduct",
				null);
	}

	public DataPage<FinishedProduct> findAllFinishedProductByPage(
			Integer pageNo, Integer pageSize) throws SQLException {
		return pagedQuery(
				"combine_order_model_FinishedProduct_findAllFinishedProductByPage",
				new HashMap<String, Object>(), pageNo, pageSize);
	}
}
